"""
@FileName：10打印一个空心菱形.py
@Author：lmz
@Time：2021/5/18 18:53
"""
rows=int(input("输入列数："))
i=j=k=1
print("打印一个菱形:\n")
#菱形的上半部分
for i in range(rows):
    for j in range(rows-i):
        print(" ",end=" ")
        j+=1
    for k in range(2*i-1):
        if k==0 or k==2*i-2:
            print("*",end=" ")
        else:
            print(" ",end=" ")
        k+=1
    print("\n")
#菱形的下半部分
for i in range(rows):
    for j in range(i):
        print(" ",end=" ")
        j+=1
    for k in range(2*(rows-i)-1):
        if k==0 or k==2*(rows-i)-2:
            print("*",end=" ")
        else:
            print(" ",end=" ")
        k+=1
    print("\n")